home *** CD-ROM | disk | FTP | other *** search
/ Software of the Month Club 2000 October / Software of the Month - Ultimate Collection Shareware 277.iso / pc / PROGRAMS / UTILITY / WINLINUX / DATA1.CAB / programs_-_include / LINUX / SDLADRV.H < prev    next >
C/C++ Source or Header  |  1999-09-17  |  2KB  |  62 lines

  1. /*****************************************************************************
  2. * sdladrv.h    SDLA Support Module.  Kernel API Definitions.
  3. *
  4. * Author:    Gene Kozin    <genek@compuserve.com>
  5. *
  6. * Copyright:    (c) 1995-1996 Sangoma Technologies Inc.
  7. *
  8. *        This program is free software; you can redistribute it and/or
  9. *        modify it under the terms of the GNU General Public License
  10. *        as published by the Free Software Foundation; either version
  11. *        2 of the License, or (at your option) any later version.
  12. * ============================================================================
  13. * Dec 11, 1996    Gene Kozin    Complete overhaul.
  14. * Oct 17, 1996    Gene Kozin    Minor bug fixes.
  15. * Jun 12, 1996    Gene Kozin     Added support for S503 card.
  16. * Dec 06, 1995    Gene Kozin    Initial version.
  17. *****************************************************************************/
  18. #ifndef    _SDLADRV_H
  19. #define    _SDLADRV_H
  20.  
  21. #define    SDLA_MAXIORANGE    4    /* maximum I/O port range */
  22. #define    SDLA_WINDOWSIZE    0x2000    /* default dual-port memory window size */
  23.  
  24. /****** Data Structures *****************************************************/
  25.  
  26. /*----------------------------------------------------------------------------
  27.  * Adapter hardware configuration. Pointer to this structure is passed to all
  28.  * APIs.
  29.  */
  30. typedef struct sdlahw
  31. {
  32.     unsigned type;            /* adapter type */
  33.     unsigned fwid;            /* firmware ID */
  34.     unsigned port;            /* adapter I/O port base */
  35.     int irq;            /* interrupt request level */
  36.     void * dpmbase;            /* dual-port memory base */
  37.     unsigned dpmsize;        /* dual-port memory size */
  38.     unsigned pclk;            /* CPU clock rate, kHz */
  39.     unsigned long memory;        /* memory size */
  40.     unsigned long vector;        /* local offset of the DPM window */
  41.     unsigned io_range;        /* I/O port range */
  42.     unsigned char regs[SDLA_MAXIORANGE]; /* was written to registers */
  43.     unsigned reserved[5];
  44. } sdlahw_t;
  45.  
  46. /****** Function Prototypes *************************************************/
  47.  
  48. extern int sdla_setup    (sdlahw_t* hw, void* sfm, unsigned len);
  49. extern int sdla_down    (sdlahw_t* hw);
  50. extern int sdla_inten    (sdlahw_t* hw);
  51. extern int sdla_intde    (sdlahw_t* hw);
  52. extern int sdla_intack    (sdlahw_t* hw);
  53. extern int sdla_intr    (sdlahw_t* hw);
  54. extern int sdla_mapmem    (sdlahw_t* hw, unsigned long addr);
  55. extern int sdla_peek    (sdlahw_t* hw, unsigned long addr, void* buf,
  56.              unsigned len);
  57. extern int sdla_poke    (sdlahw_t* hw, unsigned long addr, void* buf,
  58.              unsigned len);
  59. extern int sdla_exec    (void* opflag);
  60.  
  61. #endif    /* _SDLADRV_H */
  62.